package com.longge;

import java.util.Arrays;

public class RuneReserve {

    public int runeReserve(int[] runes) {
        Arrays.sort(runes);
        int max = 1;
        int count = 1;
        for (int i = 0; i < runes.length-1; i++) {
            if (runes[i+1]-runes[i]<=1){
                count++;
                max= Math.max(count,max);
            }else {
                count=1;
            }
        }
        return max;

    }
}
